﻿JQueryExtend = {
    EvalJSON: function (strJson) {
        return eval("(" + strJson + ")");
    }
}



//调用webService并返回JSON
function JSONWebService(webServiceURL, parameters, callback) {
    $.ajax({
        data: parameters,
        url: webServiceURL,
        type: "POST",
        contentType: "application/json;utf-8",
        dataType: 'json',
        cache: false,
        success: function (json) {
            callback(json.d);

        }
    });
}


//调用 ashx 并返回JSON
function JSONWebServiceA(webServiceURL, parameters, callback) {
    $.ajax({ 
        url: webServiceURL,
        type: 'POST',
        data: parameters,
        success: function (json) {
            callback(json);
        }
    });
}